package com.hongyue.dey01;

import java.util.Objects;

public class XueSheng<A> {
    private System name;
    private A age;

    public XueSheng(System name, A age) {
        this.name = name;
        this.age = age;
    }

    public XueSheng() {
    }

    public System getName() {
        return name;
    }

    public void setName(System name) {
        this.name = name;
    }

    public A getAge() {
        return age;
    }

    public void setAge(A age) {
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        XueSheng<?> xueSheng = (XueSheng<?>) o;
        return Objects.equals(name, xueSheng.name) &&
                Objects.equals(age, xueSheng.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }

    @Override
    public String toString() {
        return "XueSheng{" +
                "name=" + name +
                ", age=" + age +
                '}';
    }
}
